Diagnostic application programs, also called “diagnostics,” provide functionality for testing components in a computer system. Typical diagnostics include a console application program that allows a user to control the operation of the diagnostics and one or more diagnostics modules that perform the actual diagnostic tests. Diagnostics modules are available for testing virtually all of the components in a computer system. For instance, diagnostic modules exist for testing the operation of central processing units, main memory, mass storage devices, video cards, input/output devices, network devices, and other components of a computer system.
During the course of performing diagnostic tests, diagnostic modules may generate a number of result messages. For instance, during the course of a diagnostic test, messages may be generated indicating that the test has begun, indicating that various milestones have been reached in the test, indicated that the test has been completed, and indicating the results of the test. These messages are typically displayed to a user to provide an indication of the progress of the test.
The many diagnostic result messages that are generated during the execution of a diagnostic test are generally stored in the objects and classes that implement the diagnostic test. While storage of the messages in this manner provides quick access to the messages during the execution of the diagnostic test, this implementation causes the diagnostic result messages to be lost when the diagnostic test is closed and the object storing the messages is destroyed. When these messages are lost, valuable information is destroyed regarding the execution of the test and any errors encountered during the test.
One method for saving diagnostic result messages, and thereby making the messages persistent, involves saving the diagnostic result messages to a flat text file on disk. Typically, diagnostic result messages are saved to the text file as they are generated. In this manner, the diagnostic result messages are stored and made available for future retrieval. However, storage of diagnostic result messages in this manner makes it difficult to extract meaningful data from the flat text files. In particular, it is often difficult and slow to search flat text files for large quantities of desired data. These problems are further exaggerated as the size of the text file containing the diagnostic result messages increases.
Therefore, in light of the above, there is a need for a method and system for logging diagnostic result messages that can capture, store, and provide retrieval facilities for diagnostic result messages generated by diagnostic modules. There is an additional need for a method and system for accessing diagnostic result messages that can provide a robust interface for retrieving stored diagnostic result messages and generating reports from the retrieved data.